import java.util.Scanner;


public class job4 {

	public static void main(String[] args) {
		for(int i=1;i>0;i++){
			for(int j=1;j<=i;j++){
				if(((i/j==j))&&((i%j==0))){
					for(int c=1;c<=i+168;c++){
						int k=i+168;
						if(k/c==c&&k%c==0){
							System.out.println(i-100);
						}
					}
			
				}
			}
		}

	}
}
